package maven_test.app.user;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("/user")
public class UserController {
	
	@RequestMapping("/userlist")
	public String userlist(Model model) {
		List<RoleInfo> rolelist = new ArrayList<RoleInfo>();
		RoleInfo role = new RoleInfo();
		role.setID("1");
		role.setName("管理员");
		role.setDesc("0.0");
		
		RoleInfo role1 = new RoleInfo();
		role1.setID("2");
		role1.setName("扫地僧");
		role1.setDesc("0.0");
		
		RoleInfo role2 = new RoleInfo();
		role2.setID("3");
		role2.setName("安排员");
		role2.setDesc("0.0");
		
		
		rolelist.add(role);
		rolelist.add(role1);
		rolelist.add(role2);
		
		model.addAttribute("roles", rolelist);
		
		return "/user/admin-role";
	}
	
	@RequestMapping("/adduser")
	public String adduser(Model model) {
		
		return "/user/admin-role-add";
	}
	
	
	
	

}
